package face.pay.task.terminal;

import face.pay.task.terminal.service.ITerminalTargetDayCountRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Classname TerminalTargetCountTask
 * @Description JJL
 * @Date 2019/10/23 14:19
 */
@Component
public class TerminalTargetDayCountTask {

    @Autowired
    private ITerminalTargetDayCountRelationService targetCountService;

    /**
     * 将上一天记录添加到 terminal_target_day_count表中做统计
     */
    @Scheduled(cron = "0 30 1/24 * * ?")
    @Async
    public void orderDayCountCheck(){
        targetCountService.targetDayCount();
    }
}
